﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Super.Hmi.Entities
{
    [Table("sys_user")]
    public class UserEntity
    {
        [Key]
        [Column("id")]
        public int UserId { get; set; } // 用户id
        [Required]
        [MaxLength(50)]
        [Column("user_name")]
        public string UserName { get; set; } // 用户名
        [Column("gender")]
        public int Gender { get; set; } // 性别 
        [Column("department_id")]
        public int DepartmentId { get; set; } // 部门id
        [Column("gravatar")]
        public string? Gravatar { get; set; } // 头像
        [Required]
        [Column("password")]
        public string Password { get; set; } = "123456"; // 密码，默认值为123456
        [Column("nick_name")]
        public string? NickName { get; set; } // 昵称
        [Column("email")]
        public string? Email { get; set; } // 邮箱
        [Column("phone")]
        public string? Phone { get; set; } // 手机号
        [Column("create_time")]
        public string CreateTime { get; set; } // 创建时间
        [Column("update_time")]
        public string UpdateTime { get; set; } // 更新时间
        [Column("is_active")]
        public int IsActive { get; set; } // 是否激活
        [Column("last_login_time")]
        public string? LastLoginTime { get; set; } // 最后登录时间
        [Column("personalized_signature")]
        public string? PersonalizedSignature { get; set; } // 个性签名
    }
}
